/************************************************************************
 *
 * io.h
 *
 * (c) Copyright 1996-2004 Analog Devices, Inc.  All rights reserved.
 * $Revision: 6 $
 ************************************************************************/

/* Low-level I/O functions */

#pragma once
#ifndef __NO_BUILTIN
#pragma system_header /* io.h */
#endif

#ifndef __IO_DEFINED
#define __IO_DEFINED

#include <sys/major.h>

#define TTY_INIT tty_init

#ifdef __cplusplus
extern "C" {
#endif

extern int open  (int dev, ...);
extern int close (int fd);
extern int read  (int fd, char *block, int len);
extern int write (int fd, char *block, int len);
extern int seek  (int fd, long addr, int whence);
extern int ctrl  (int fd, int op, int arg1, int arg2);
extern int flush (int fd);

#ifdef __cplusplus
}
#endif

#endif /* __IO_DEFINED */
